#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <set>

using namespace std;

class point_t
{
public:
    point_t(int x_, int y_): x(x_), y(y_){}  
    int x, y;
};

bool myComp(const point_t* lhs, const point_t* rhs)
{
    return lhs->x == rhs->x ? lhs->y > rhs->y : lhs->x < rhs->x;
}

void findConvexHull(vector<point_t *> &pointVec)
{
    int n = pointVec.size();
    int start = 0;
    int p = start;
    do {
        int n = -1;
	for (int i = 0; i < pointVec.size(); i++) {
	    if (i == p ) continue;
	    if (n == -1) p = i;
	    int cross = 

	}


    } while (start != p);
    

}


int main(int argc, char **argv)
{
    vector<point_t *> pointVec;
    pointVec.push_back(new point_t(1, 3));
    pointVec.push_back(new point_t(2, 7));
    pointVec.push_back(new point_t(3, 3));
    pointVec.push_back(new point_t(4, 8));
    pointVec.push_back(new point_t(5, 1));
    pointVec.push_back(new point_t(2, 3));
    sort(pointVec.begin(), pointVec.end(), myComp);
    for (int i = 0; i < pointVec.size(); i++) 
	cout << pointVec[i]->x << " " << pointVec[i]->y << " " << endl; 
}
